<template>
	<el-dialog class="no-header-dialog" v-model="dialogShow" width="300">
		<div ref="downBox">
				<el-image style="width: 300px;" :src="currentRow.url" fit="fill" />
				<!-- <el-divider border-style="dashed" />
				<div class="line-height-s">设备编号：{{ currentRow.deviceNum }}</div>
				<div class="zs-space-top line-height-s">设备名称：{{ currentRow.deviceName }}</div>
				<div class="zs-space-top line-height-s">设备位置：{{ currentRow.floorNum }}</div> -->
		</div>
		<!-- <template #footer>
			<el-button class="zs-btn-md zs-btn-primary" @click="downLoad">下载</el-button>
		</template> -->
	</el-dialog>
</template>

<script setup>
	// import html2canvas from 'html2canvas';
	import { ref } from 'vue';
	const props = defineProps({
		currentRow: { type: Object },
	});
	const dialogShow = ref(false);
	// const downBox = ref();
	// const downLoad = () => {
	// 	html2canvas(downBox.value, {useCORS: true}).then(canvas => {
	// 		const link = document.createElement('a');
	// 		link.download = props.currentRow.deviceName + '.png'; // 设置要下载的图片的名称
	// 		link.href = canvas.toDataURL();
	// 		link.click();
	// 	});
	// };
	defineExpose({ dialogShow });
</script>